package chuishop.yiqimaicai.service.Impl;

import chuishop.yiqimaicai.mapper.CollectMapper;
import chuishop.yiqimaicai.pojo.Collect;
import chuishop.yiqimaicai.service.CollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CollectServiceImpl implements CollectService {

    @Autowired
    private CollectMapper collectMapper;

    @Override
    public List<Collect> selectCollectByUid(Integer uid) {
        return collectMapper.selectCollectByUid(uid);
    }

    @Override
    public boolean addCollect(Collect collect) {
        return collectMapper.addCollect(collect)>0;
    }

    @Override
    public boolean delCollect(String[] ids) {
        return collectMapper.delCollect(ids)>0;
    }
}
